package com.neusoft.nepm.mapper;

import com.neusoft.nepm.dto.PageResponseDto;
import com.neusoft.nepm.dto.SvRemarksDto;
import com.neusoft.nepm.dto.SvpageRequestDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.neusoft.nepm.po.Supervisor;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface SupervisorMapper extends BaseMapper<Supervisor>{

	/****************** neps 工程 ********************/
	//公众监督员登录 
	@Select("select * from supervisor where tel_id=#{telId} and password=#{password}")
	public Supervisor getSupervisorByIdByPass(Supervisor supervisor);

	@Update("UPDATE supervisor SET password = '123' WHERE tel_id = #{telId}")
	int resetPasswordById(@Param("telId") String telId);



	int getSupervisorCount(@Param("request") SvpageRequestDto request);

	// 分页查询

	List<Supervisor> listSupervisorPage(@Param("request") SvpageRequestDto request);

	@Update("UPDATE supervisor SET remarks=#{remarks} WHERE tel_id = #{telId}")
    int addRemarksById(SvRemarksDto svRemarksDto);
    /****************** neps 工程 ********************/
}
